home *** CD-ROM | disk | FTP | other *** search
- /*
- File: AEDataModel.h
-
- Contains: AppleEvent Data Model Interfaces.
-
- Version: Technology: Copland
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __AEDATAMODEL__
- #define __AEDATAMODEL__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- #ifndef __MEMORY__
- #include <Memory.h>
- #endif
- #if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
- #if !FOR_PTR_BASED_AE
- #ifndef __MIXEDMODE__
- #include <MixedMode.h>
- #endif
- #endif
- #endif
- #if FOR_SYSTEM8_PREEMPTIVE
- #ifndef __MEMALLOCATORS__
- #include <MemAllocators.h>
- #endif
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
-
- enum {
- /* Apple event descriptor types */
- typeBoolean = 'bool',
- typeChar = 'TEXT', /* Preferred numeric Apple event descriptor types */
- typeSInt16 = 'shor',
- typeSInt32 = 'long',
- typeUInt32 = 'magn',
- typeSInt64 = 'comp',
- typeIEEE32BitFloatingPoint = 'sing',
- typeIEEE64BitFloatingPoint = 'doub',
- type128BitFloatingPoint = 'ldbl',
- typeDecimalStruct = 'decm', /* Non-preferred Apple event descriptor types */
- typeSMInt = typeSInt16,
- typeShortInteger = typeSInt16,
- typeInteger = typeSInt32,
- typeLongInteger = typeSInt32,
- typeMagnitude = typeUInt32,
- typeComp = typeSInt64,
- typeSMFloat = typeIEEE32BitFloatingPoint,
- typeShortFloat = typeIEEE32BitFloatingPoint,
- typeFloat = typeIEEE64BitFloatingPoint,
- typeLongFloat = typeIEEE64BitFloatingPoint,
- typeExtended = 'exte', /* More Apple event descriptor types */
- typeAEList = 'list',
- typeAERecord = 'reco',
- typeAppleEvent = 'aevt',
- typeEventRecord = 'evrc',
- typeTrue = 'true',
- typeFalse = 'fals',
- typeAlias = 'alis',
- typeEnumerated = 'enum',
- typeType = 'type',
- typeAppParameters = 'appa',
- typeProperty = 'prop',
- typeFSS = 'fss ',
- typeKeyword = 'keyw',
- typeSectionH = 'sect',
- typeWildCard = '****',
- typeApplSignature = 'sign',
- typeQDRectangle = 'qdrt',
- typeFixed = 'fixd',
- typeSessionID = 'ssid',
- typeTargetID = 'targ',
- typeProcessSerialNumber = 'psn ',
- typeKernelProcessID = 'kpid',
- typeDispatcherID = 'dspt',
- typeNull = 'null' /* null or nonexistent data */
- };
-
- /* Keywords for Apple event attributes */
-
- enum {
- keyTransactionIDAttr = 'tran',
- keyReturnIDAttr = 'rtid',
- keyEventClassAttr = 'evcl',
- keyEventIDAttr = 'evid',
- keyAddressAttr = 'addr',
- keyOptionalKeywordAttr = 'optk',
- keyTimeoutAttr = 'timo',
- keyInteractLevelAttr = 'inte', /* this attribute is read only - will be set in AESend */
- keyEventSourceAttr = 'esrc', /* this attribute is read only */
- keyMissedKeywordAttr = 'miss', /* this attribute is read only */
- keyOriginalAddressAttr = 'from' /* new in 1.0.1 */
- };
-
- /* Constants used for specifying the factoring of AEDescLists. */
-
- enum {
- kAEDescListFactorNone = 0,
- kAEDescListFactorType = 4,
- kAEDescListFactorTypeAndSize = 8
- };
-
- /* Constants used creating an AppleEvent */
-
- enum {
- /* Constant for the returnID param of AECreateAppleEvent */
- kAutoGenerateReturnID = -1, /* AECreateAppleEvent will generate a session-unique ID */
- /* Constant for transaction ID’s */
- kAnyTransactionID = 0 /* no transaction is in use */
- };
-
- /* Apple event manager data types */
- typedef ResType DescType;
- typedef FourCharCode AEKeyword;
- #if FOR_PTR_BASED_AE
- typedef struct OpaqueAEDescData* AEDescData;
- struct AEDesc {
- DescType descriptorType;
- AEDescData descriptorData;
- };
- typedef struct AEDesc AEDesc;
-
- /*typedef AEDesc * AEDescPtr;*/
- #else
- struct AEDesc {
- DescType descriptorType;
- Handle dataHandle;
- };
- typedef struct AEDesc AEDesc;
-
- typedef AEDesc *AEDescPtr;
- #endif
- struct AEKeyDesc {
- AEKeyword descKey;
- AEDesc descContent;
- };
- typedef struct AEKeyDesc AEKeyDesc;
-
- /* a list of AEDesc's is a special kind of AEDesc */
- typedef AEDesc AEDescList;
- /* AERecord is a list of keyworded AEDesc's */
- typedef AEDescList AERecord;
- /* an AEDesc which contains address data */
- typedef AEDesc AEAddressDesc;
- /* an AERecord that contains an AppleEvent, and related data types */
- typedef AERecord AppleEvent;
- typedef AppleEvent *AppleEventPtr;
- typedef SInt16 AEReturnID;
- typedef SInt32 AETransactionID;
- typedef FourCharCode AEEventClass;
- typedef FourCharCode AEEventID;
- typedef SInt8 AEArrayType;
-
- enum {
- kAEDataArray = 0,
- kAEPackedArray = 1,
- kAEDescArray = 3,
- kAEKeyDescArray = 4
- };
-
- #if FOR_PTR_BASED_AE
- union AEArrayData {
- short kAEDataArray[1];
- char kAEPackedArray[1];
- AEDesc kAEDescArray[1];
- AEKeyDesc kAEKeyDescArray[1];
- };
- typedef union AEArrayData AEArrayData;
-
- #else
-
- enum {
- kAEHandleArray = 2
- };
-
- union AEArrayData {
- short kAEDataArray[1];
- char kAEPackedArray[1];
- Handle kAEHandleArray[1];
- AEDesc kAEDescArray[1];
- AEKeyDesc kAEKeyDescArray[1];
- };
- typedef union AEArrayData AEArrayData;
-
- #endif
- typedef AEArrayData *AEArrayDataPointer;
- /*
- *************************************************************************
- These calls are used to set up and modify the coercion dispatch table.
- *************************************************************************
- */
- #if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
- #if !FOR_PTR_BASED_AE
- typedef pascal OSErr (*AECoerceDescProcPtr)(const AEDesc *fromDesc, DescType toType, long handlerRefcon, AEDesc *toDesc);
- typedef pascal OSErr (*AECoercePtrProcPtr)(DescType typeCode, const void *dataPtr, Size dataSize, DescType toType, long handlerRefcon, AEDesc *result);
-
- #if GENERATINGCFM
- typedef UniversalProcPtr AECoerceDescUPP;
- typedef UniversalProcPtr AECoercePtrUPP;
- #else
- typedef AECoerceDescProcPtr AECoerceDescUPP;
- typedef AECoercePtrProcPtr AECoercePtrUPP;
- #endif
-
- enum {
- uppAECoerceDescProcInfo = kPascalStackBased
- | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(const AEDesc *)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(DescType)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long)))
- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(AEDesc *))),
- uppAECoercePtrProcInfo = kPascalStackBased
- | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(DescType)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const void *)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Size)))
- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(DescType)))
- | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(long)))
- | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(AEDesc *)))
- };
-
- #if GENERATINGCFM
- #define NewAECoerceDescProc(userRoutine) \
- (AECoerceDescUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppAECoerceDescProcInfo, GetCurrentArchitecture())
- #define NewAECoercePtrProc(userRoutine) \
- (AECoercePtrUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppAECoercePtrProcInfo, GetCurrentArchitecture())
- #else
- #define NewAECoerceDescProc(userRoutine) \
- ((AECoerceDescUPP) (userRoutine))
- #define NewAECoercePtrProc(userRoutine) \
- ((AECoercePtrUPP) (userRoutine))
- #endif
-
- #if GENERATINGCFM
- #define CallAECoerceDescProc(userRoutine, fromDesc, toType, handlerRefcon, toDesc) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppAECoerceDescProcInfo, (fromDesc), (toType), (handlerRefcon), (toDesc))
- #define CallAECoercePtrProc(userRoutine, typeCode, dataPtr, dataSize, toType, handlerRefcon, result) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppAECoercePtrProcInfo, (typeCode), (dataPtr), (dataSize), (toType), (handlerRefcon), (result))
- #else
- #define CallAECoerceDescProc(userRoutine, fromDesc, toType, handlerRefcon, toDesc) \
- (*(userRoutine))((fromDesc), (toType), (handlerRefcon), (toDesc))
- #define CallAECoercePtrProc(userRoutine, typeCode, dataPtr, dataSize, toType, handlerRefcon, result) \
- (*(userRoutine))((typeCode), (dataPtr), (dataSize), (toType), (handlerRefcon), (result))
- #endif
- typedef UniversalProcPtr AECoercionHandlerUPP;
- extern pascal OSErr AEInstallCoercionHandler(DescType fromType, DescType toType, AECoercionHandlerUPP handler, long handlerRefcon, Boolean fromTypeIsDesc, Boolean isSysHandler)
- THREEWORDINLINE(0x303C, 0x0A22, 0xA816);
-
- extern pascal OSErr AERemoveCoercionHandler(DescType fromType, DescType toType, AECoercionHandlerUPP handler, Boolean isSysHandler)
- THREEWORDINLINE(0x303C, 0x0723, 0xA816);
-
- extern pascal OSErr AEGetCoercionHandler(DescType fromType, DescType toType, AECoercionHandlerUPP *handler, long *handlerRefcon, Boolean *fromTypeIsDesc, Boolean isSysHandler)
- THREEWORDINLINE(0x303C, 0x0B24, 0xA816);
-
- #endif
- #endif
- #if FOR_SYSTEM8_PREEMPTIVE
- #if FOR_PTR_BASED_AE
- typedef OSStatus (*AECoercionProc)(DescType typeCode, const void *dataPtr, ByteCount dataSize, DescType toType, void *handlerRefcon, AEDesc *result);
- extern OSStatus AEInstallCoercion(DescType fromType, DescType toType, AECoercionProc handler, void *handlerRefcon);
-
- extern OSStatus AERemoveCoercion(DescType fromType, DescType toType, AECoercionProc handler);
-
- extern OSStatus AEGetCoercion(DescType fromType, DescType toType, AECoercionProc *handler, void **handlerRefcon);
-
- #endif
- #endif
- /*
- *************************************************************************
- The following calls provide for a coercion interface.
- *************************************************************************
- */
- #if FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE
- extern pascal OSErr AECoercePtr(DescType typeCode, const void *dataPtr, Size dataSize, DescType toType, AEDesc *result)
- THREEWORDINLINE(0x303C, 0x0A02, 0xA816);
-
- extern pascal OSErr AECoerceDesc(const AEDesc *theAEDesc, DescType toType, AEDesc *result)
- THREEWORDINLINE(0x303C, 0x0603, 0xA816);
-
- #endif
- /*
- *************************************************************************
- The following calls apply to any AEDesc. Every 'result' descriptor is
- created for you, so you will be responsible for memory management
- (including disposing) of the descriptors so created.
- *************************************************************************
- */
- #if FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE
- extern pascal OSErr AECreateDesc(DescType typeCode, const void *dataPtr, Size dataSize, AEDesc *result)
- THREEWORDINLINE(0x303C, 0x0825, 0xA816);
-
- extern pascal OSErr AEDisposeDesc(AEDesc *theAEDesc)
- THREEWORDINLINE(0x303C, 0x0204, 0xA816);
-
- extern pascal OSErr AEDuplicateDesc(const AEDesc *theAEDesc, AEDesc *result)
- THREEWORDINLINE(0x303C, 0x0405, 0xA816);
-
- #endif
- #if FOR_SYSTEM8_PREEMPTIVE
- #if FOR_PTR_BASED_AE
- extern OSStatus AEClearDesc(AEDesc *descToClear);
-
- extern Boolean AEDescIsNull(const AEDesc *desc);
-
- extern OSStatus AESizeOfDescData(const AEDesc *desc, DescType *descriptorType, ByteCount *dataSize);
-
- extern OSStatus AEGetDescData(const AEDesc *desc, DescType *typeCode, void *dataBuffer, ByteCount maximumSize, ByteCount *actualSize);
-
- #endif
- #endif
- /*
- *************************************************************************
- The following calls apply to AEDescList. Since AEDescList is a subtype of
- AEDesc, the calls in the previous section can also be used for AEDescList.
- All list and array indices are 1-based. If the data was greater than
- maximumSize in the routines below, then actualSize will be greater than
- maximumSize, but only maximumSize bytes will actually be retrieved.
- *************************************************************************
- */
- #if FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE
- extern pascal OSErr AECreateList(const void *factoringPtr, Size factoredSize, Boolean isRecord, AEDescList *resultList)
- THREEWORDINLINE(0x303C, 0x0706, 0xA816);
-
- extern pascal OSErr AECountItems(const AEDescList *theAEDescList, long *theCount)
- THREEWORDINLINE(0x303C, 0x0407, 0xA816);
-
- extern pascal OSErr AEPutPtr(AEDescList *theAEDescList, long index, DescType typeCode, const void *dataPtr, Size dataSize)
- THREEWORDINLINE(0x303C, 0x0A08, 0xA816);
-
- extern pascal OSErr AEPutDesc(AEDescList *theAEDescList, long index, const AEDesc *theAEDesc)
- THREEWORDINLINE(0x303C, 0x0609, 0xA816);
-
- extern pascal OSErr AEGetNthPtr(const AEDescList *theAEDescList, long index, DescType desiredType, AEKeyword *theAEKeyword, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
- THREEWORDINLINE(0x303C, 0x100A, 0xA816);
-
- extern pascal OSErr AEGetNthDesc(const AEDescList *theAEDescList, long index, DescType desiredType, AEKeyword *theAEKeyword, AEDesc *result)
- THREEWORDINLINE(0x303C, 0x0A0B, 0xA816);
-
- extern pascal OSErr AESizeOfNthItem(const AEDescList *theAEDescList, long index, DescType *typeCode, Size *dataSize)
- THREEWORDINLINE(0x303C, 0x082A, 0xA816);
-
- extern pascal OSErr AEGetArray(const AEDescList *theAEDescList, AEArrayType arrayType, AEArrayDataPointer arrayPtr, Size maximumSize, DescType *itemType, Size *itemSize, long *itemCount)
- THREEWORDINLINE(0x303C, 0x0D0C, 0xA816);
-
- extern pascal OSErr AEPutArray(AEDescList *theAEDescList, AEArrayType arrayType, const AEArrayData *arrayPtr, DescType itemType, Size itemSize, long itemCount)
- THREEWORDINLINE(0x303C, 0x0B0D, 0xA816);
-
- extern pascal OSErr AEDeleteItem(AEDescList *theAEDescList, long index)
- THREEWORDINLINE(0x303C, 0x040E, 0xA816);
-
- #endif
- /*
- *************************************************************************
- The following calls apply to AERecord. Since AERecord is a subtype of
- AEDescList, the calls in the previous sections can also be used for
- AERecord an AERecord can be created by using AECreateList with isRecord
- set to true.
- *************************************************************************
- */
- #if FOR_SYSTEM8_PREEMPTIVE
- extern pascal OSErr AEPutKeyPtr(AERecord *theAERecord, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
- THREEWORDINLINE(0x303C, 0x0A0F, 0xA816);
-
- extern pascal OSErr AEPutKeyDesc(AERecord *theAERecord, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
- THREEWORDINLINE(0x303C, 0x0610, 0xA816);
-
- extern pascal OSErr AEGetKeyPtr(const AERecord *theAERecord, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
- THREEWORDINLINE(0x303C, 0x0E11, 0xA816);
-
- extern pascal OSErr AEGetKeyDesc(const AERecord *theAERecord, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
- THREEWORDINLINE(0x303C, 0x0812, 0xA816);
-
- extern pascal OSErr AESizeOfKeyDesc(const AERecord *theAERecord, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
- THREEWORDINLINE(0x303C, 0x0829, 0xA816);
-
- extern pascal OSErr AEDeleteKeyDesc(AERecord *theAERecord, AEKeyword theAEKeyword)
- THREEWORDINLINE(0x303C, 0x0413, 0xA816);
-
- #endif
- #if FOR_SYSTEM7_ONLY
- /*
- Note: The following #defines map “key” calls on AERecords into “param” calls on
- AppleEvents. Although no errors are currently returned if AERecords are
- passed to “param” calls and AppleEvents to “key” calls, the behavior of
- this type of API-mixing is not explicitly documented in Inside Macintosh.
- It just happens that the “key” calls have the same functionality as their
- “param” counterparts. Since none of the “key” calls are currently available
- in the PowerPC IntefaceLib, the #defines exploit the fact that “key” and
- “param” routines can be used interchangeably, and makes sure that every
- invokation of a “key” API becomes an invokation of a “param” API.
- */
- #define AEPutKeyPtr(theAERecord, theAEKeyword, typeCode, dataPtr, dataSize) \
- AEPutParamPtr((theAERecord), (theAEKeyword), (typeCode), (dataPtr), (dataSize))
- #define AEPutKeyDesc(theAERecord, theAEKeyword, theAEDesc) \
- AEPutParamDesc((theAERecord), (theAEKeyword), (theAEDesc))
- #define AEGetKeyPtr(theAERecord, theAEKeyword, desiredType, typeCode, dataPtr, maxSize, actualSize) \
- AEGetParamPtr((theAERecord), (theAEKeyword), (desiredType), (typeCode), (dataPtr), (maxSize), (actualSize))
- #define AEGetKeyDesc(theAERecord, theAEKeyword, desiredType, result) \
- AEGetParamDesc((theAERecord), (theAEKeyword), (desiredType), (result))
- #define AESizeOfKeyDesc(theAERecord, theAEKeyword, typeCode, dataSize) \
- AESizeOfParam((theAERecord), (theAEKeyword), (typeCode), (dataSize))
- #define AEDeleteKeyDesc(theAERecord, theAEKeyword) \
- AEDeleteParam((theAERecord), (theAEKeyword))
- #endif
- /*
- *************************************************************************
- The following calls create and manipulate the AppleEvent data type.
- *************************************************************************
- */
- #if FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE
- extern pascal OSErr AECreateAppleEvent(AEEventClass theAEEventClass, AEEventID theAEEventID, const AEAddressDesc *target, AEReturnID returnID, AETransactionID transactionID, AppleEvent *result)
- THREEWORDINLINE(0x303C, 0x0B14, 0xA816);
-
- #endif
- #if FOR_SYSTEM8_PREEMPTIVE
- #if FOR_PTR_BASED_AE
- extern OSStatus AECustomCreateAppleEvent(AEEventClass theAEEventClass, AEEventID theAEEventID, const AEAddressDesc *target, AEReturnID returnID, AETransactionID transactionID, MemAllocatorRef allocator, AppleEvent *result);
-
- extern OSStatus AECreateReplyAppleEvent(const AEAddressDesc *replyAddress, MemAllocatorRef allocator, AppleEvent *result);
-
- #endif
- #endif
- /*
- *************************************************************************
- The following calls are used to pack and unpack parameters from records
- of type AppleEvent. Since AppleEvent is a subtype of AERecord, the calls
- in the previous sections can also be used for variables of type
- AppleEvent. The next six calls are in fact identical to the six calls
- for AERecord.
- *************************************************************************
- */
- #if FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE
- extern pascal OSErr AEPutParamPtr(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
- THREEWORDINLINE(0x303C, 0x0A0F, 0xA816);
-
- extern pascal OSErr AEPutParamDesc(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
- THREEWORDINLINE(0x303C, 0x0610, 0xA816);
-
- extern pascal OSErr AEGetParamPtr(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
- THREEWORDINLINE(0x303C, 0x0E11, 0xA816);
-
- extern pascal OSErr AEGetParamDesc(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
- THREEWORDINLINE(0x303C, 0x0812, 0xA816);
-
- extern pascal OSErr AESizeOfParam(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
- THREEWORDINLINE(0x303C, 0x0829, 0xA816);
-
- extern pascal OSErr AEDeleteParam(AppleEvent *theAppleEvent, AEKeyword theAEKeyword)
- THREEWORDINLINE(0x303C, 0x0413, 0xA816);
-
- #endif
- /*
- *************************************************************************
- The following calls also apply to type AppleEvent. Message attributes are
- far more restricted, and can only be accessed through the following 5
- calls. The various list and record routines cannot be used to access the
- attributes of an event.
- *************************************************************************
- */
- #if FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE
- extern pascal OSErr AEGetAttributePtr(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
- THREEWORDINLINE(0x303C, 0x0E15, 0xA816);
-
- extern pascal OSErr AEGetAttributeDesc(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
- THREEWORDINLINE(0x303C, 0x0826, 0xA816);
-
- extern pascal OSErr AESizeOfAttribute(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
- THREEWORDINLINE(0x303C, 0x0828, 0xA816);
-
- extern pascal OSErr AEPutAttributePtr(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
- THREEWORDINLINE(0x303C, 0x0A16, 0xA816);
-
- extern pascal OSErr AEPutAttributeDesc(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
- THREEWORDINLINE(0x303C, 0x0627, 0xA816);
-
- #endif
- #if FOR_SYSTEM8_PREEMPTIVE
- #if FOR_PTR_BASED_AE
- /*
- *************************************************************************
- These calls are used to convert AEDescs into a "flattened", canonical
- form and back again.
- *************************************************************************
- */
- extern OSStatus AEConvertDescToAEDF(const AEDesc *descriptor, void *dataBuffer, ByteCount maximumSize, ByteCount *actualSize);
-
- extern OSStatus AEConvertAEDFToDesc(const void *dataBuffer, ByteCount bufferSize, AEDesc *result);
-
- extern OSStatus AEConvertAEDFToAppleEvent(AEEventClass eventClass, AEEventID eventID, const AEAddressDesc *target, AEReturnID returnID, AETransactionID transactionID, const void *dataBuffer, ByteCount bufferSize, MemAllocatorRef allocator, AppleEvent *result);
-
- /*
- *************************************************************************
- The following calls apply to AEStreams. Once a AEStream has been
- fully written, it may be converted to an AEDesc, AEDescList or AERecord
- to be used by the various other routines listed above.
- *************************************************************************
- */
- typedef struct OpaqueAEStream* AEStream;
- extern OSStatus AECreateStream(MemAllocatorRef allocator, AEStream *newStream);
-
- extern OSStatus AECreateStreamToAppendDescList(const AEDescList *source, MemAllocatorRef allocator, AEStream *newStream);
-
- extern OSStatus AEDisposeStream(AEStream deadStream);
-
- extern OSStatus AEWriteStreamKey(AEStream stream, AEKeyword keyword);
-
- extern OSStatus AEWriteStreamPtr(AEStream stream, void *dataPtr, ByteCount dataSize);
-
- extern OSStatus AEWriteStreamDesc(AEStream stream, DescType dataType, void *dataPtr, ByteCount dataSize);
-
- extern OSStatus AEWriteStreamAEDesc(AEStream stream, const AEDesc *desc);
-
- extern OSStatus AEOpenStreamDesc(AEStream stream, DescType descriptorType);
-
- extern OSStatus AEOpenStreamList(AEStream stream, void *factorData, ByteCount factorSize, Boolean isRecord);
-
- extern OSStatus AECloseStreamDesc(AEStream stream);
-
- extern OSStatus AEConvertStreamToDesc(AEStream stream, AEDesc *desc);
-
- extern OSStatus AEConvertStreamToAEDF(AEStream stream, void *dataBuffer, ByteCount maximumSize, ByteCount *actualSize);
-
- extern OSStatus AEConvertStreamToAppleEvent(AEEventClass eventClass, AEEventID eventID, const AEAddressDesc *target, AEReturnID returnID, AETransactionID transactionID, AEStream stream, MemAllocatorRef allocator, AppleEvent *result);
-
- /*
- *************************************************************************
- The following calls apply to AESubDescs. AESubDescs provide an efficient
- way to traverse recursive AERecords and AEDescLists.
- *************************************************************************
- */
- struct OpaqueAESubDesc {
- UInt32 reserved[8];
- };
- typedef struct OpaqueAESubDesc OpaqueAESubDesc;
-
- typedef OpaqueAESubDesc AESubDesc;
- extern OSStatus AEConvertDescToSubDesc(const AEDesc *desc, AESubDesc *newSubDesc);
-
- extern OSStatus AEConvertSubDescToDesc(const AESubDesc *subDesc, DescType desiredType, AEDesc *desc);
-
- extern OSStatus AEConvertAppleEventAttributesToSubDesc(const AppleEvent *event, AESubDesc *subDesc);
-
- extern DescType AEGetSubDescType(const AESubDesc *subDesc);
-
- extern DescType AEGetSubDescBasicType(const AESubDesc *subDesc);
-
- extern Boolean AESubDescIsListOrRecord(const AESubDesc *subDesc);
-
- extern OSStatus AEGetSubDescData(const AESubDesc *subDesc, void *dataPtr, ByteCount bufferSize, ByteCount *actualSize);
-
- extern OSStatus AESetSubDescData(const AESubDesc *subDesc, void *dataPtr, ByteCount sizePtr);
-
- extern OSStatus AEGetSubDescFactorData(const AESubDesc *subDesc, void *factorData, ByteCount bufferSize, ByteCount *actualSize);
-
- extern OSStatus AECountSubDescItems(const AESubDesc *subDesc, ItemCount *items);
-
- extern OSStatus AEGetNthSubDesc(const AESubDesc *subDesc, ItemCount item, AEKeyword *keyword, AESubDesc *newSubDesc);
-
- extern OSStatus AEGetKeySubDesc(const AESubDesc *subDesc, AEKeyword keyword, AESubDesc *newSubDesc);
-
- #endif
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __AEDATAMODEL__ */
-
-